package com.phoneSensor;

import android.app.Activity;
import android.bluetooth.BluetoothDevice;
import android.os.Bundle;

import com.phoneSensor.communication.ClientBluetoothCommunicate;
import com.phoneSensor.communication.CommunicateSupporter;

public class bluetoothService extends Activity implements CommunicateSupporter {

	private final ClientBluetoothCommunicate bluetoothCommun =
		new ClientBluetoothCommunicate(this, this) {
			public void foundNewDevice(BluetoothDevice newDev) {
				
			}
	};
	
	public void sendData(String data) {
		bluetoothCommun.sendData(data);
	}

	// bluetoothCommun received data, will call this method.
	public void recvData(String data) {
		
	}

	public void start() {
		bluetoothCommun.start();
	}

	public void stop() {
		bluetoothCommun.stop();
	}

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.bluetooth_setting);
		start();
	}
	
	@Override
	public void onStop() {
		stop();
		super.onStop();
	}
}
